<template>
    <div>
        child-
        <button @click="handleClick">click</button>
    </div>
</template>

<script>
export default {
    data() {
        return {

        }
    },
    methods: {
        handleClick() {
            console.log('child-click');
            console.log('$parent拿到了父组件' + this.$parent.title);
            console.log('$root拿到了根组件' + this.$root.title);
        }
    }
}
</script>

<style>

</style>